<?php include(APPLICATION_PATH.'modules/hm-news/views/scripts/common/navigation.phtml'); ?>
<h2 class="title">Tags</h2>
<div class="prepend-top append-bottom clear">
	<form enctype="multipart/form-data" action="<?php echo $this->url(array('action'=>'tags-add-set')); ?>" method="post">
		<div class="hide">
			<input type="hidden" name="id" id="id" value="" />
		</div>
		<div class="clear">
			<div class="span-2 append-bottom"><label for="name">Tag:</label></div>
			<input type="text" name="description" tabindex="1" maxlength="255" class="span-6 append-bottom" />
		</div>
		<div class="clear"><input type="submit" tabindex="2" name="add" value="Cadastrar" /></div>
	</form>
	<div class="clear prepend-top append-bottom">
		Tags:
		<?php foreach($this->list_tags as $list_tags) : ?>
			<a href="<?= $this->url(array('action'=>'tags-set','id'=>$this->rowid,'tags_id'=>$list_tags['id'])) ?>"><?= $list_tags['description']; ?></a>
		<?php endforeach; ?>
	</div>
</div>
<table>
	<thead>
		<tr class="box">
			<td>Tags Relacionadas</td>
			<td></td>
		</tr>
	</thead>
	<tfooter></tfooter>
	<tbody>
		<?php foreach($this->link_tags as $link_tags) : ?>
			<tr>
				<td><?php echo $link_tags['description']; ?></td>
				<td>
					<a href="<?= $this->url(array('action'=>'tags-unset','id'=>$this->rowid,'tags_id'=>$link_tags['id'])) ?>">Excluir</a>
				</td>
			</tr>
		<?php endforeach; ?>
	</tbody>
</table>